package org.example.command;

public class UndoCommand implements Command {

    private CommandInvoker commandInvoker;

    public UndoCommand(CommandInvoker commandInvoker) {
        this.commandInvoker = commandInvoker;
    }

    @Override
    public boolean execute() {
        commandInvoker.undoLastCommand();
        return true;
    }
}
